package com.zry.android.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * (User)表实体类
 */
@SuppressWarnings("serial")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User extends Model<User> {

    @TableId(value = "fid",type = IdType.AUTO)
    private Integer fId;
    //登录账户
    private String fAccount;

    private String fPassword;
    //用户名
    private String fName;
    //个性签名
    private String fSign;
    //头像
    private String fImg;

    // 逻辑删除
    @TableLogic
    private Integer deleted; // 0:未删除 1:删除

    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date fCreateTime;

    //修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date fModifyTime;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.fId;
    }
}